package com.bw.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.bw.domain.SysUser;
import com.bw.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;

public class CellDataDemoHeadDataListener1 implements ReadListener<SysUser> {
    @Autowired
    private SysUserService sysUserService;

    public CellDataDemoHeadDataListener1(SysUserService sysUserService){

        this.sysUserService=sysUserService;
    }

    @Override
    public void invoke(SysUser user, AnalysisContext analysisContext) {

        sysUserService.insertUser(user);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

        System.out.println("=============解析玩之后的方法");
    }
}
